export default {
  filters: {},

  methods: {
    /**
     * 获取CRM关键字
     */
    getActivityType(activityType) {
      // 1 线索 2 客户 3 联系人 4 产品 5 商机 6 合同 7 回款 8 日志 9 审批 10 日程 11 任务 12 发邮件
      return {
        1: 'leads',
        2: 'customer',
        3: 'contacts',
        4: 'product',
        5: 'business',
        6: 'contract',
        7: 'receivables',
        8: 'log',
        9: 'examine',
        11: 'task'
      }[activityType]
    },

    getActivityTypeName(activityType) {
      // 1 线索 2 客户 3 联系人 4 产品 5 商机 6 合同 7 回款 8 日志 9 审批 10 日程 11 任务 12 发邮件 17 回访 18 发票
      return {
        1: this.$t('crm.components.df6bc41532112fafee83940e7de47d26'),
        2: this.$t('crm.components.4c156e09382ff58309f9b7981ee7e9f3'),
        3: this.$t('crm.components.01e7ad9bbcc2d49a36bf8501f9793ff5'),
        4: this.$t('crm.components.32d28bf9633e7688af1d24594ba1029a'),
        5: this.$t('crm.components.800ff6e1a5e2b66fd3467cce07dfd97d'),
        6: this.$t('crm.components.97f9c1c98ea7921267359e9552ee304b'),
        7: this.$t('crm.components.62905ad6018336543213a583dc6dc0ee'),
        8: this.$t('crm.components.b4b3d9e2e4bef346f525326527ff4f62'),
        9: this.$t('crm.components.036fc6a6c8fd4b0b76b737088bb02886'),
        10: this.$t('crm.components.ef49904fe94131f95434dd3cc0abad23'),
        11: this.$t('crm.components.f85b3b9b459cc02088a59622307a36bb'),
        12: this.$t('crm.components.6a16ef3e1c6e6bfd6830e85169100f05'),
        13: this.$t('crm.components.54073c59d81c1d77ebfd08eb781dffc8'),
        14: this.$t('crm.components.14ce353d5870bf891af19e27596273d4'),
        17: this.$t('crm.components.027e6ccb826ed5cba22043024e39c709'),
        18: this.$t('crm.components.cfeb45c4fd95fd10302d686040ed066c')
      }[activityType]
    },

    getRecordLogTypeName(type) {
      if (!type) {
        return this.$t('crm.components.cc7b385d806bcc31dbd522a2ad9aec1e')
      }
      // 活动类型 1 跟进记录 2 创建记录 3 阶段更改 4 外勤签到
      return {
        1: this.$t('crm.components.ef931c2585af86a37d11ab3cd96288fc'),
        2: this.$t('crm.components.67c09a2225db59501e7f95349cff3427'),
        3: this.$t('crm.components.98da3387d3bf386895f2ed584fc904e0'),
        4: this.$t('crm.components.fd52e3f054b27f02de6ea458ba219472'),
        5: this.$t('crm.components.9638d313f8b44bc5080a5adfe575ce4f')
      }[type]
    }
  }
}
